package com.quiz.bis.service;

import com.quiz.bis.domain.vo.QuestionCategoryVo;
import com.quiz.common.mybatis.core.page.TableDataInfo;
import com.quiz.bis.domain.model.QuestionCategory;
import com.quiz.common.mybatis.core.page.PageQuery;
import java.util.List;

/**
 * 题目分类服务层接口
 * @author ahuan
 */
public interface IQuestionCategoryService {
    // 树形分类相关方法
    List<QuestionCategoryVo> selectCategoryTree();
    List<QuestionCategory> selectChildrenById(Long id);

    // 知识点分页相关方法
    TableDataInfo<QuestionCategoryVo> pageKnowledge(QuestionCategory questionCategory, PageQuery page);
    List<QuestionCategoryVo> listKnowledge(QuestionCategory questionCategory);

    // 公共方法
    QuestionCategoryVo getById(Long id);
    boolean save(QuestionCategory questionCategory);
    boolean update(QuestionCategory questionCategory);
    boolean deleteByIds(Long[] ids);
    boolean checkNameUnique(QuestionCategory questionCategory);
    boolean checkCodeUnique(QuestionCategory questionCategory);
    boolean hasChildById(Long id);

}